home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1987-09-26 | 7.3 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: processchar.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sat Sep 26 14:31:47 1987, modified Sat Sep 26 14:31:47 1987, creator 'MPS ', type ASCII, 6823 bytes "processchar.c" , at 0x1b27 382 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 70 72 6f 63 65 73 | 73 63 68 61 72 2e 63 00 |..proces|schar.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 1a a7 00 | 00 01 7e 9d 81 b8 93 9d |........|..~.....|
|00000060| 81 b8 93 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 9a 98 00 00 |........|........|
|00000080| 2f 2a 20 0d 20 20 20 20 | 54 68 69 73 20 46 69 6c |/* . |This Fil|
|00000090| 65 20 63 6f 6e 74 61 69 | 6e 73 20 72 6f 75 74 69 |e contai|ns routi|
|000000a0| 6e 65 73 20 77 68 69 63 | 68 20 70 72 6f 63 65 73 |nes whic|h proces|
|000000b0| 73 20 69 6e 63 6f 6d 69 | 6e 67 20 63 68 61 72 61 |s incomi|ng chara|
|000000c0| 63 74 65 72 73 0d 09 61 | 6e 64 20 75 73 65 72 20 |cters..a|nd user |
|000000d0| 6b 65 79 73 74 72 6f 6b | 65 73 2e 20 49 74 20 72 |keystrok|es. It r|
|000000e0| 65 71 75 69 72 65 73 20 | 74 68 65 20 73 63 72 65 |equires |the scre|
|000000f0| 65 6e 20 6c 69 62 72 61 | 72 79 0d 09 41 75 74 68 |en libra|ry..Auth|
|00000100| 6f 72 3a 20 4a 65 72 72 | 79 20 4c 65 56 61 6e 0d |or: Jerr|y LeVan.|
|00000110| 09 09 09 33 32 35 20 42 | 6f 6f 6e 65 20 54 72 61 |...325 B|oone Tra|
|00000120| 69 6c 0d 09 09 09 52 69 | 63 68 6d 6f 6e 64 20 4b |il....Ri|chmond K|
|00000130| 79 20 34 30 34 37 35 0d | 09 09 09 0d 09 09 09 4d |y 40475.|.......M|
|00000140| 61 79 20 31 39 38 37 0d | 09 09 09 0d 09 53 74 61 |ay 1987.|.....Sta|
|00000150| 72 74 65 64 20 61 6e 20 | 69 6e 76 65 73 74 69 67 |rted an |investig|
|00000160| 61 74 69 6f 6e 20 6f 66 | 20 42 20 70 72 6f 74 6f |ation of| B proto|
|00000170| 63 6f 6c 0d 09 41 75 67 | 20 32 39 2c 31 39 38 37 |col..Aug| 29,1987|
|00000180| 3a 20 41 64 64 20 52 65 | 61 64 5f 4d 6f 64 65 6d |: Add Re|ad_Modem|
|00000190| 0d 2a 2f 0d 0d 23 69 6e | 63 6c 75 64 65 20 3c 65 |.*/..#in|clude <e|
|000001a0| 76 65 6e 74 73 2e 68 3e | 09 0d 23 69 6e 63 6c 75 |vents.h>|..#inclu|
|000001b0| 64 65 20 3c 64 65 76 69 | 63 65 73 2e 68 3e 0d 23 |de <devi|ces.h>.#|
|000001c0| 69 6e 63 6c 75 64 65 20 | 3c 73 65 72 69 61 6c 2e |include |<serial.|
|000001d0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 64 69 61 |h>.#incl|ude <dia|
|000001e0| 6c 6f 67 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |logs.h>.|#include|
|000001f0| 20 3c 4f 53 55 74 69 6c | 73 2e 68 3e 0d 23 69 6e | <OSUtil|s.h>.#in|
|00000200| 63 6c 75 64 65 20 3c 4d | 65 6e 75 73 2e 68 3e 0d |clude <M|enus.h>.|
|00000210| 0d 23 64 65 66 69 6e 65 | 20 53 74 61 74 73 5f 49 |.#define| Stats_I|
|00000220| 44 20 31 32 39 0d 0d 23 | 64 65 66 69 6e 65 20 4c |D 129..#|define L|
|00000230| 46 20 30 78 61 0d 23 64 | 65 66 69 6e 65 20 43 52 |F 0xa.#d|efine CR|
|00000240| 20 30 78 64 0d 0d 65 78 | 74 65 72 6e 20 63 68 61 | 0xd..ex|tern cha|
|00000250| 72 20 64 6f 43 72 4c 66 | 3b 0d 65 78 74 65 72 6e |r doCrLf|;.extern|
|00000260| 20 73 68 6f 72 74 20 42 | 53 66 6c 61 67 3b 0d 65 | short B|Sflag;.e|
|00000270| 78 74 65 72 6e 20 73 68 | 6f 72 74 20 6c 6f 63 61 |xtern sh|ort loca|
|00000280| 6c 45 63 68 6f 3b 0d 65 | 78 74 65 72 6e 20 73 68 |lEcho;.e|xtern sh|
|00000290| 6f 72 74 20 72 65 63 52 | 65 66 3b 0d 65 78 74 65 |ort recR|ef;.exte|
|000002a0| 72 6e 20 42 6f 6f 6c 65 | 61 6e 20 61 73 63 69 69 |rn Boole|an ascii|
|000002b0| 52 65 63 65 69 76 65 3b | 0d 65 78 74 65 72 6e 20 |Receive;|.extern |
|000002c0| 4d 65 6e 75 48 61 6e 64 | 6c 65 20 46 69 6c 65 4d |MenuHand|le FileM|
|000002d0| 65 6e 75 3b 0d 65 78 74 | 65 72 6e 20 42 6f 6f 6c |enu;.ext|ern Bool|
|000002e0| 65 61 6e 20 6b 65 79 70 | 61 64 5f 61 70 70 3b 20 |ean keyp|ad_app; |
|000002f0| 20 2f 2a 20 64 65 66 69 | 6e 65 64 20 69 6e 20 76 | /* defi|ned in v|
|00000300| 74 31 30 30 20 2a 2f 0d | 0d 0d 73 74 61 74 69 63 |t100 */.|..static|
|00000310| 20 6c 6f 6e 67 20 6d 61 | 78 52 65 61 64 3d 30 3b | long ma|xRead=0;|
|00000320| 09 09 09 2f 2a 20 6c 61 | 72 67 65 73 74 20 73 75 |.../* la|rgest su|
|00000330| 70 70 6c 79 20 6f 66 20 | 63 68 61 72 73 20 69 6e |pply of |chars in|
|00000340| 20 53 65 72 69 61 6c 20 | 62 75 66 66 65 72 20 2a | Serial |buffer *|
|00000350| 2f 0d 73 74 61 74 69 63 | 20 6c 6f 6e 67 20 61 76 |/.static| long av|
|00000360| 67 52 65 61 64 3d 30 3b | 09 09 09 2f 2a 20 61 76 |gRead=0;|.../* av|
|00000370| 65 72 61 67 65 20 73 69 | 7a 65 20 6f 66 20 72 65 |erage si|ze of re|
|00000380| 61 64 20 2a 2f 0d 73 74 | 61 74 69 63 20 6c 6f 6e |ad */.st|atic lon|
|00000390| 67 20 63 6e 74 52 65 61 | 64 3d 30 3b 09 09 09 2f |g cntRea|d=0;.../|
|000003a0| 2a 20 6e 75 6d 62 65 72 | 20 6f 66 20 72 65 61 64 |* number| of read|
|000003b0| 73 20 74 68 69 73 20 73 | 65 73 73 69 6f 6e 20 2a |s this s|ession *|
|000003c0| 2f 0d 73 74 61 74 69 63 | 20 6c 6f 6e 67 20 74 6f |/.static| long to|
|000003d0| 74 52 65 61 64 3d 30 3b | 09 09 09 2f 2a 20 54 6f |tRead=0;|.../* To|
|000003e0| 74 61 6c 20 63 68 61 72 | 73 20 72 65 61 64 20 74 |tal char|s read t|
|000003f0| 6f 20 64 61 74 65 20 2a | 2f 0d 0d 23 64 65 66 69 |o date *|/..#defi|
|00000400| 6e 65 20 4c 49 4e 45 42 | 55 46 53 5a 20 38 30 09 |ne LINEB|UFSZ 80.|
|00000410| 09 2f 2a 20 4d 61 78 69 | 6d 75 6d 20 6e 75 6d 62 |./* Maxi|mum numb|
|00000420| 65 72 20 6f 66 20 63 68 | 61 72 61 63 74 65 72 73 |er of ch|aracters|
|00000430| 20 69 6e 20 6c 69 6e 65 | 20 62 75 66 66 65 72 20 | in line| buffer |
|00000440| 2a 2f 0d 73 74 61 74 69 | 63 20 6c 6f 6e 67 20 6c |*/.stati|c long l|
|00000450| 69 6e 65 42 75 66 43 6e | 74 3d 30 3b 09 2f 2a 20 |ineBufCn|t=0;./* |
|00000460| 4e 75 6d 62 65 72 20 6f | 66 20 43 68 61 72 61 63 |Number o|f Charac|
|00000470| 74 65 72 73 20 69 6e 20 | 6c 6f 63 61 6c 20 62 75 |ters in |local bu|
|00000480| 66 66 65 72 20 2a 2f 0d | 0d 2f 2a 0d 20 2a 20 54 |ffer */.|./*. * T|
|00000490| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 70 72 6f |he follo|wing pro|
|000004a0| 63 65 64 75 72 65 20 72 | 65 74 75 72 6e 73 20 54 |cedure r|eturns T|
|000004b0| 72 75 65 20 61 6e 64 20 | 74 68 65 20 22 6e 65 78 |rue and |the "nex|
|000004c0| 74 22 20 63 68 61 72 61 | 63 74 65 72 20 66 72 6f |t" chara|cter fro|
|000004d0| 6d 20 0d 20 2a 20 74 68 | 65 20 6d 6f 64 65 6d 20 |m . * th|e modem |
|000004e0| 69 66 20 6f 6e 65 20 69 | 73 20 61 76 61 69 6c 61 |if one i|s availa|
|000004f0| 62 6c 65 2c 6f 74 68 65 | 72 77 69 73 65 20 66 61 |ble,othe|rwise fa|
|00000500| 6c 73 65 2e 20 54 68 65 | 20 72 6f 75 74 69 6e 65 |lse. The| routine|
|00000510| 20 77 69 6c 6c 0d 20 2a | 20 62 75 66 66 65 72 20 | will. *| buffer |
|00000520| 75 70 74 6f 20 4c 49 4e | 42 55 46 53 5a 20 63 68 |upto LIN|BUFSZ ch|
|00000530| 61 72 61 63 74 65 72 73 | 20 74 6f 20 74 72 79 20 |aracters| to try |
|00000540| 74 6f 20 72 65 64 75 63 | 65 20 52 4f 4d 20 63 61 |to reduc|e ROM ca|
|00000550| 6c 6c 73 2e 20 54 68 65 | 0d 20 2a 20 76 61 72 69 |lls. The|. * vari|
|00000560| 61 62 6c 65 20 6c 69 6e | 65 42 75 66 66 43 6e 74 |able lin|eBuffCnt|
|00000570| 20 77 69 6c 6c 20 62 65 | 20 74 68 65 20 63 6f 75 | will be| the cou|
|00000580| 6e 74 20 6f 66 20 63 68 | 61 72 73 20 69 6e 20 74 |nt of ch|ars in t|
|00000590| 68 65 20 6c 6f 63 61 6c | 20 62 75 66 66 65 72 0d |he local| buffer.|
|000005a0| 20 2a 2f 0d 20 0d 42 6f | 6f 6c 65 61 6e 20 52 65 | */. .Bo|olean Re|
|000005b0| 61 64 5f 4d 6f 64 65 6d | 28 70 74 72 2c 72 65 66 |ad_Modem|(ptr,ref|
|000005c0| 4e 75 6d 29 0d 20 20 63 | 68 61 72 20 2a 70 74 72 |Num). c|har *ptr|
|000005d0| 3b 09 09 2f 2a 20 57 68 | 65 72 65 20 74 6f 20 6c |;../* Wh|ere to l|
|000005e0| 65 61 76 65 20 74 68 65 | 20 63 68 61 72 61 63 74 |eave the| charact|
|000005f0| 65 72 20 2a 2f 0d 20 20 | 73 68 6f 72 74 20 72 65 |er */. |short re|
|00000600| 66 4e 75 6d 3b 09 09 2f | 2a 20 57 68 69 63 68 20 |fNum;../|* Which |
|00000610| 63 68 61 6e 6e 65 6c 20 | 74 6f 20 75 73 65 20 2a |channel |to use *|
|00000620| 2f 0d 20 7b 0d 20 20 20 | 73 74 61 74 69 63 20 63 |/. {. |static c|
|00000630| 68 61 72 20 6c 69 6e 65 | 42 75 66 66 5b 4c 49 4e |har line|Buff[LIN|
|00000640| 45 42 55 46 53 5a 5d 3b | 20 2f 2a 20 6c 6f 63 61 |EBUFSZ];| /* loca|
|00000650| 6c 20 62 75 66 66 65 72 | 20 2a 2f 0d 20 20 20 73 |l buffer| */. s|
|00000660| 74 61 74 69 63 20 63 68 | 61 72 20 2a 70 6f 73 3b |tatic ch|ar *pos;|
|00000670| 09 09 20 2f 2a 20 6c 6f | 63 61 6c 20 70 6f 69 6e |.. /* lo|cal poin|
|00000680| 74 65 72 20 69 6e 74 6f | 20 74 68 65 20 62 75 66 |ter into| the buf|
|00000690| 66 65 72 20 2a 2f 0d 20 | 20 20 0d 20 20 20 69 66 |fer */. | . if|
|000006a0| 28 6c 69 6e 65 42 75 66 | 43 6e 74 20 3c 3d 20 30 |(lineBuf|Cnt <= 0|
|000006b0| 29 20 20 20 2f 2a 20 7a | 65 72 6f 20 6d 65 61 6e |) /* z|ero mean|
|000006c0| 73 20 6f 75 74 20 6f 66 | 20 63 68 61 72 61 63 74 |s out of| charact|
|000006d0| 65 72 73 20 2a 2f 0d 20 | 20 20 20 20 7b 20 53 65 |ers */. | { Se|
|000006e0| 72 47 65 74 42 75 66 28 | 72 65 66 4e 75 6d 2c 26 |rGetBuf(|refNum,&|
|000006f0| 6c 69 6e 65 42 75 66 43 | 6e 74 29 3b 20 20 2f 2a |lineBufC|nt); /*|
|00000700| 20 66 69 6e 64 20 6f 75 | 74 20 69 66 20 61 6e 79 | find ou|t if any|
|00000710| 20 63 68 61 72 73 20 61 | 72 65 20 61 76 61 69 6c | chars a|re avail|
|00000720| 20 2a 2f 0d 09 20 20 20 | 69 66 20 28 6c 69 6e 65 | */.. |if (line|
|00000730| 42 75 66 43 6e 74 20 3e | 20 30 29 09 09 2f 2a 20 |BufCnt >| 0)../* |
|00000740| 6e 6f 74 20 7a 65 72 6f | 20 6d 65 61 6e 73 20 77 |not zero| means w|
|00000750| 65 20 68 61 76 65 20 73 | 6f 6d 65 20 2a 2f 0d 09 |e have s|ome */..|
|00000760| 20 20 20 20 20 7b 20 2f | 2a 20 63 6f 6c 6c 65 63 | { /|* collec|
|00000770| 74 20 73 6f 6d 65 20 73 | 74 61 74 69 73 74 69 63 |t some s|tatistic|
|00000780| 73 20 2a 2f 0d 09 09 20 | 0d 09 09 20 20 09 69 66 |s */... |... .if|
|00000790| 20 28 6c 69 6e 65 42 75 | 66 43 6e 74 20 3e 20 6d | (lineBu|fCnt > m|
|000007a0| 61 78 52 65 61 64 29 20 | 6d 61 78 52 65 61 64 20 |axRead) |maxRead |
|000007b0| 3d 20 6c 69 6e 65 42 75 | 66 43 6e 74 3b 0d 09 20 |= lineBu|fCnt;.. |
|000007c0| 20 20 09 09 63 6e 74 52 | 65 61 64 2b 2b 3b 0d 09 | ..cntR|ead++;..|
|000007d0| 20 20 20 0d 09 20 20 20 | 09 09 2f 2a 20 67 65 74 | .. |../* get|
|000007e0| 20 73 6f 6d 65 20 63 68 | 61 72 61 63 74 65 72 73 | some ch|aracters|
|000007f0| 20 2a 2f 0d 09 20 20 20 | 09 09 69 66 28 6c 69 6e | */.. |..if(lin|
|00000800| 65 42 75 66 43 6e 74 20 | 3e 20 4c 49 4e 45 42 55 |eBufCnt |> LINEBU|
|00000810| 46 53 5a 29 20 6c 69 6e | 65 42 75 66 43 6e 74 20 |FSZ) lin|eBufCnt |
|00000820| 3d 20 4c 49 4e 45 42 55 | 46 53 5a 3b 20 2f 2a 20 |= LINEBU|FSZ; /* |
|00000830| 64 6f 6e 27 74 20 67 65 | 74 20 74 6f 6f 20 6d 61 |don't ge|t too ma|
|00000840| 6e 79 20 63 68 61 72 61 | 63 74 65 72 73 20 2a 2f |ny chara|cters */|
|00000850| 0d 09 20 20 20 0d 09 20 | 20 20 09 09 46 53 52 65 |.. .. | ..FSRe|
|00000860| 61 64 28 72 65 66 4e 75 | 6d 2c 26 6c 69 6e 65 42 |ad(refNu|m,&lineB|
|00000870| 75 66 43 6e 74 2c 6c 69 | 6e 65 42 75 66 66 29 3b |ufCnt,li|neBuff);|
|00000880| 0d 09 09 09 70 6f 73 20 | 3d 20 28 63 68 61 72 20 |....pos |= (char |
|00000890| 2a 29 6c 69 6e 65 42 75 | 66 66 3b 09 2f 2a 20 72 |*)lineBu|ff;./* r|
|000008a0| 65 73 65 74 20 70 6f 69 | 6e 74 65 72 20 2a 2f 0d |eset poi|nter */.|
|000008b0| 09 20 20 20 0d 09 20 20 | 20 09 09 74 6f 74 52 65 |. .. | ..totRe|
|000008c0| 61 64 20 2b 3d 6c 69 6e | 65 42 75 66 43 6e 74 3b |ad +=lin|eBufCnt;|
|000008d0| 0d 09 20 20 20 09 09 61 | 76 67 52 65 61 64 20 3d |.. ..a|vgRead =|
|000008e0| 20 74 6f 74 52 65 61 64 | 2f 63 6e 74 52 65 61 64 | totRead|/cntRead|
|000008f0| 3b 0d 09 09 20 20 7d 0d | 09 09 20 65 6c 73 65 20 |;... }.|.. else |
|00000900| 72 65 74 75 72 6e 20 28 | 66 61 6c 73 65 29 3b 20 |return (|false); |
|00000910| 2f 2a 20 6e 6f 20 63 68 | 61 72 61 63 74 65 72 73 |/* no ch|aracters|
|00000920| 20 77 68 65 72 65 20 69 | 6e 20 74 68 65 20 50 6f | where i|n the Po|
|00000930| 72 74 20 42 75 66 66 65 | 72 20 2a 2f 0d 09 20 20 |rt Buffe|r */.. |
|00000940| 20 7d 20 20 2f 2a 20 74 | 68 65 20 6c 6f 63 61 6c | } /* t|he local|
|00000950| 20 62 75 66 66 65 72 20 | 77 61 73 20 65 6d 70 74 | buffer |was empt|
|00000960| 79 20 2a 2f 0d 09 6c 69 | 6e 65 42 75 66 43 6e 74 |y */..li|neBufCnt|
|00000970| 2d 2d 3b 20 20 2f 2a 20 | 64 65 63 72 65 6d 65 6e |--; /* |decremen|
|00000980| 74 20 74 68 65 20 63 6f | 75 6e 74 20 2a 2f 0d 09 |t the co|unt */..|
|00000990| 2a 70 74 72 20 3d 20 2a | 70 6f 73 2b 2b 3b 20 20 |*ptr = *|pos++; |
|000009a0| 2f 2a 20 63 6f 70 79 20 | 74 68 65 20 63 68 61 72 |/* copy |the char|
|000009b0| 61 63 74 65 72 20 2a 2f | 0d 09 72 65 74 75 72 6e |acter */|..return|
|000009c0| 20 28 74 72 75 65 29 20 | 3b 20 20 20 2f 2a 20 72 | (true) |; /* r|
|000009d0| 65 74 75 72 6e 20 73 75 | 63 63 65 73 73 20 2a 2f |eturn su|ccess */|
|000009e0| 0d 20 20 7d 0d 20 20 0d | 2f 2a 20 63 61 6c 6c 65 |. }. .|/* calle|
|000009f0| 64 20 6d 79 20 6d 61 69 | 6e 20 74 6f 20 70 72 6f |d my mai|n to pro|
|00000a00| 63 65 73 73 20 63 68 61 | 72 61 63 74 65 72 73 20 |cess cha|racters |
|00000a10| 66 72 6f 6d 20 6d 6f 64 | 65 6d 20 2a 2f 20 0d 76 |from mod|em */ .v|
|00000a20| 6f 69 64 20 52 65 61 64 | 50 6f 72 74 28 72 65 66 |oid Read|Port(ref|
|00000a30| 4e 75 6d 29 0d 20 20 73 | 68 6f 72 74 20 72 65 66 |Num). s|hort ref|
|00000a40| 4e 75 6d 3b 20 20 20 09 | 09 2f 2a 20 69 6e 70 75 |Num; .|./* inpu|
|00000a50| 74 20 72 65 66 6e 75 6d | 20 2a 2f 0d 20 20 7b 20 |t refnum| */. { |
|00000a60| 0d 09 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |..unsign|ed char |
|00000a70| 63 68 3b 09 2f 2a 20 63 | 68 61 72 61 63 74 65 72 |ch;./* c|haracter|
|00000a80| 20 75 6e 64 65 72 20 63 | 6f 6e 73 69 64 65 72 61 | under c|onsidera|
|00000a90| 74 69 6f 6e 20 2a 2f 0d | 09 6c 6f 6e 67 20 6c 63 |tion */.|.long lc|
|00000aa0| 6e 74 3b 0d 09 4f 53 45 | 72 72 20 65 72 72 3b 0d |nt;..OSE|rr err;.|
|00000ab0| 09 64 6f 0d 09 20 20 69 | 66 28 52 65 61 64 5f 4d |.do.. i|f(Read_M|
|00000ac0| 6f 64 65 6d 28 26 63 68 | 2c 72 65 66 4e 75 6d 29 |odem(&ch|,refNum)|
|00000ad0| 29 0d 09 20 20 20 7b 0d | 20 20 20 20 20 20 20 20 |).. {.| |
|00000ae0| 63 68 20 26 3d 20 30 78 | 37 66 20 3b 20 2f 2a 20 |ch &= 0x|7f ; /* |
|00000af0| 6d 61 73 6b 20 74 6f 20 | 73 65 76 65 6e 20 62 69 |mask to |seven bi|
|00000b00| 74 73 20 2a 2f 0d 09 09 | 2f 2a 20 63 68 65 63 6b |ts */...|/* check|
|00000b10| 20 74 6f 20 73 65 65 20 | 69 66 20 77 65 20 61 72 | to see |if we ar|
|00000b20| 65 20 72 65 63 6f 72 64 | 69 6e 67 20 2a 2f 0d 09 |e record|ing */..|
|00000b30| 09 69 66 28 61 73 63 69 | 69 52 65 63 65 69 76 65 |.if(asci|iReceive|
|00000b40| 29 0d 09 09 20 20 69 66 | 28 63 68 20 21 3d 30 78 |)... if|(ch !=0x|
|00000b50| 61 29 20 7b 0d 09 09 20 | 20 20 20 20 6c 63 6e 74 |a) {... | lcnt|
|00000b60| 20 3d 20 31 3b 0d 09 09 | 09 20 69 66 28 65 72 72 | = 1;...|. if(err|
|00000b70| 20 3d 20 46 53 57 72 69 | 74 65 28 72 65 63 52 65 | = FSWri|te(recRe|
|00000b80| 66 2c 26 6c 63 6e 74 2c | 26 63 68 29 29 7b 0d 09 |f,&lcnt,|&ch)){..|
|00000b90| 09 09 20 20 20 45 72 72 | 6f 72 4d 65 73 73 61 67 |.. Err|orMessag|
|00000ba0| 65 28 22 45 72 72 6f 72 | 20 44 75 72 69 6e 67 20 |e("Error| During |
|00000bb0| 57 72 69 74 65 22 2c 65 | 72 72 2c 6e 69 6c 2c 6e |Write",e|rr,nil,n|
|00000bc0| 69 6c 29 3b 0d 09 09 09 | 20 20 20 46 53 43 6c 6f |il);....| FSClo|
|00000bd0| 73 65 28 72 65 63 52 65 | 66 29 3b 72 65 63 52 65 |se(recRe|f);recRe|
|00000be0| 66 20 3d 20 30 3b 0d 09 | 09 09 20 20 20 61 73 63 |f = 0;..|.. asc|
|00000bf0| 69 69 52 65 63 65 69 76 | 65 20 3d 20 66 61 6c 73 |iiReceiv|e = fals|
|00000c00| 65 3b 0d 09 09 09 20 20 | 20 53 65 74 49 74 65 6d |e;.... | SetItem|
|00000c10| 28 46 69 6c 65 4d 65 6e | 75 2c 31 2c 22 53 74 61 |(FileMen|u,1,"Sta|
|00000c20| 72 74 20 54 65 78 74 20 | 43 61 70 74 75 72 65 2e |rt Text |Capture.|
|00000c30| 2e 2e 22 29 3b 0d 09 09 | 09 7d 20 20 2f 2a 20 69 |..");...|.} /* i|
|00000c40| 66 20 65 72 72 20 2a 2f | 0d 09 09 20 20 20 7d 20 |f err */|... } |
|00000c50| 2f 2a 20 69 66 20 61 73 | 63 69 69 52 65 63 65 69 |/* if as|ciiRecei|
|00000c60| 76 65 20 2a 2f 0d 09 09 | 20 20 50 75 74 5f 43 68 |ve */...| Put_Ch|
|00000c70| 61 72 28 63 68 29 3b 0d | 09 09 20 20 69 66 28 20 |ar(ch);.|.. if( |
|00000c80| 64 6f 43 72 4c 66 20 26 | 26 28 63 68 20 3d 3d 20 |doCrLf &|&(ch == |
|00000c90| 43 52 29 29 20 50 75 74 | 5f 43 68 61 72 28 4c 46 |CR)) Put|_Char(LF|
|00000ca0| 29 3b 0d 09 09 7d 20 2f | 2a 20 74 68 65 72 65 20 |);...} /|* there |
|00000cb0| 77 61 73 20 61 20 63 68 | 61 72 61 63 74 65 72 20 |was a ch|aracter |
|00000cc0| 2a 2f 0d 20 20 20 20 77 | 68 69 6c 65 20 28 6c 69 |*/. w|hile (li|
|00000cd0| 6e 65 42 75 66 43 6e 74 | 20 3e 20 30 29 3b 20 20 |neBufCnt| > 0); |
|00000ce0| 2f 2a 20 70 72 6f 63 65 | 73 73 20 61 6c 6c 20 63 |/* proce|ss all c|
|00000cf0| 68 61 72 61 63 74 65 72 | 73 20 69 6e 20 6c 6f 63 |haracter|s in loc|
|00000d00| 61 6c 20 62 75 66 66 65 | 72 20 2a 2f 0d 09 66 6c |al buffe|r */..fl|
|00000d10| 75 73 68 62 75 66 28 29 | 3b 0d 20 20 7d 0d 0d 2f |ushbuf()|;. }../|
|00000d20| 2a 20 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 70 |* This r|outine p|
|00000d30| 72 6f 63 65 73 73 65 73 | 20 4d 61 63 20 4b 65 79 |rocesses| Mac Key|
|00000d40| 53 74 72 6f 6b 65 73 20 | 2a 2f 20 20 0d 76 6f 69 |Strokes |*/ .voi|
|00000d50| 64 20 50 72 6f 63 65 73 | 73 43 68 61 72 28 63 68 |d Proces|sChar(ch|
|00000d60| 2c 63 6f 64 65 2c 72 65 | 66 4e 75 6d 2c 6d 6f 64 |,code,re|fNum,mod|
|00000d70| 69 66 69 65 72 73 29 0d | 20 20 75 6e 73 69 67 6e |ifiers).| unsign|
|00000d80| 65 64 20 63 68 61 72 20 | 63 68 3b 09 09 2f 2a 20 |ed char |ch;../* |
|00000d90| 74 68 65 20 72 65 63 65 | 69 76 65 64 20 63 68 61 |the rece|ived cha|
|00000da0| 72 61 63 74 65 72 20 2a | 2f 0d 20 20 75 6e 73 69 |racter *|/. unsi|
|00000db0| 67 6e 65 64 20 63 68 61 | 72 20 63 6f 64 65 3b 09 |gned cha|r code;.|
|00000dc0| 2f 2a 20 74 68 65 20 6b | 65 79 20 6e 75 6d 62 65 |/* the k|ey numbe|
|00000dd0| 72 20 2a 2f 0d 20 20 73 | 68 6f 72 74 20 72 65 66 |r */. s|hort ref|
|00000de0| 4e 75 6d 3b 09 09 09 2f | 2a 20 6f 75 74 70 75 74 |Num;.../|* output|
|00000df0| 20 64 72 69 76 65 72 20 | 72 65 66 6e 75 6d 20 2a | driver |refnum *|
|00000e00| 2f 0d 20 20 73 68 6f 72 | 74 20 6d 6f 64 69 66 69 |/. shor|t modifi|
|00000e10| 65 72 73 3b 09 09 2f 2a | 20 6d 6f 64 69 66 69 65 |ers;../*| modifie|
|00000e20| 72 20 66 69 65 6c 64 20 | 2a 2f 0d 20 20 0d 20 20 |r field |*/. . |
|00000e30| 0d 7b 20 20 20 6c 6f 6e | 67 20 63 6e 74 3b 0d 20 |.{ lon|g cnt;. |
|00000e40| 20 20 20 53 65 72 53 74 | 61 52 65 63 20 73 74 61 | SerSt|aRec sta|
|00000e50| 74 52 65 63 3b 0d 20 20 | 20 20 0d 20 20 20 20 2f |tRec;. | . /|
|00000e60| 2a 20 69 66 20 74 68 65 | 20 6b 65 79 62 6f 61 72 |* if the| keyboar|
|00000e70| 64 20 69 73 20 6c 6f 63 | 6b 65 64 20 62 65 65 70 |d is loc|ked beep|
|00000e80| 20 61 6e 64 20 69 67 6e | 6f 72 65 20 63 68 61 72 | and ign|ore char|
|00000e90| 61 63 74 65 72 20 2a 2f | 0d 09 53 65 72 53 74 61 |acter */|..SerSta|
|00000ea0| 74 75 73 28 72 65 66 4e | 75 6d 2c 26 73 74 61 74 |tus(refN|um,&stat|
|00000eb0| 52 65 63 29 3b 0d 09 20 | 69 66 20 28 73 74 61 74 |Rec);.. |if (stat|
|00000ec0| 52 65 63 2e 78 4f 66 66 | 48 6f 6c 64 29 7b 20 53 |Rec.xOff|Hold){ S|
|00000ed0| 79 73 42 65 65 70 28 37 | 29 3b 20 72 65 74 75 72 |ysBeep(7|); retur|
|00000ee0| 6e 3b 7d 0d 09 20 0d 09 | 2f 2a 20 69 66 20 74 68 |n;}.. ..|/* if th|
|00000ef0| 65 20 6c 6f 63 61 6c 20 | 65 63 68 6f 20 66 6c 61 |e local |echo fla|
|00000f00| 67 20 69 73 20 75 70 20 | 77 65 20 6d 75 73 74 20 |g is up |we must |
|00000f10| 6c 6f 63 61 6c 6c 79 20 | 64 72 61 77 20 74 68 65 |locally |draw the|
|00000f20| 20 63 68 61 72 61 63 74 | 65 72 20 2a 2f 0d 09 0d | charact|er */...|
|00000f30| 09 69 66 20 28 6c 6f 63 | 61 6c 45 63 68 6f 29 20 |.if (loc|alEcho) |
|00000f40| 50 75 74 5f 43 68 61 72 | 28 63 68 29 3b 0d 09 0d |Put_Char|(ch);...|
|00000f50| 09 2f 2a 20 68 61 6e 64 | 6c 65 20 76 61 78 20 73 |./* hand|le vax s|
|00000f60| 70 65 63 69 66 69 63 20 | 6b 65 79 73 74 72 6f 6b |pecific |keystrok|
|00000f70| 65 73 20 2a 2f 0d 09 0d | 20 20 20 20 63 6e 74 20 |es */...| cnt |
|00000f80| 3d 20 31 3b 0d 20 20 20 | 20 69 66 20 28 63 68 20 |= 1;. | if (ch |
|00000f90| 3d 3d 20 30 78 30 38 29 | 7b 20 2f 2a 20 69 66 20 |== 0x08)|{ /* if |
|00000fa0| 62 61 63 6b 73 70 61 63 | 65 20 2a 2f 0d 09 20 20 |backspac|e */.. |
|00000fb0| 20 69 66 28 21 28 6d 6f | 64 69 66 69 65 72 73 20 | if(!(mo|difiers |
|00000fc0| 26 20 6f 70 74 69 6f 6e | 4b 65 79 29 29 20 20 2f |& option|Key)) /|
|00000fd0| 2a 20 61 6e 64 20 6f 70 | 74 69 6f 6e 20 6b 65 79 |* and op|tion key|
|00000fe0| 20 6e 6f 74 20 64 6f 77 | 6e 20 2a 2f 0d 09 20 20 | not dow|n */.. |
|00000ff0| 20 20 20 20 20 20 69 66 | 28 21 42 53 66 6c 61 67 | if|(!BSflag|
|00001000| 29 63 68 20 3d 20 30 78 | 37 66 3b 20 2f 2a 20 62 |)ch = 0x|7f; /* b|
|00001010| 61 63 6b 73 70 61 63 65 | 20 2d 3e 20 64 65 6c 20 |ackspace| -> del |
|00001020| 66 6f 72 20 76 61 78 20 | 2a 2f 0d 20 20 20 20 20 |for vax |*/. |
|00001030| 20 20 46 53 57 72 69 74 | 65 28 72 65 66 4e 75 6d | FSWrit|e(refNum|
|00001040| 2c 26 63 6e 74 2c 26 63 | 68 29 3b 0d 09 20 20 20 |,&cnt,&c|h);.. |
|00001050| 72 65 74 75 72 6e 3b 0d | 09 20 7d 0d 20 20 20 2f |return;.|. }. /|
|00001060| 2a 20 70 72 6f 63 65 73 | 73 20 74 68 65 20 61 72 |* proces|s the ar|
|00001070| 72 6f 77 20 61 6e 64 20 | 70 66 31 2e 2e 70 66 34 |row and |pf1..pf4|
|00001080| 20 6b 65 79 73 20 2a 2f | 0d 20 20 20 63 6e 74 20 | keys */|. cnt |
|00001090| 3d 20 33 3b 0d 20 20 20 | 73 77 69 74 63 68 28 63 |= 3;. |switch(c|
|000010a0| 68 29 7b 0d 20 20 20 20 | 63 61 73 65 20 30 78 31 |h){. |case 0x1|
|000010b0| 63 3a 20 46 53 57 72 69 | 74 65 28 72 65 66 4e 75 |c: FSWri|te(refNu|
|000010c0| 6d 2c 26 63 6e 74 2c 22 | 5c 30 33 33 4f 44 22 29 |m,&cnt,"|\033OD")|
|000010d0| 3b 20 72 65 74 75 72 6e | 3b 20 2f 2a 20 72 69 67 |; return|; /* rig|
|000010e0| 68 74 20 61 72 72 6f 77 | 20 2a 2f 20 20 0d 09 63 |ht arrow| */ ..c|
|000010f0| 61 73 65 20 30 78 31 64 | 3a 20 46 53 57 72 69 74 |ase 0x1d|: FSWrit|
|00001100| 65 28 72 65 66 4e 75 6d | 2c 26 63 6e 74 2c 22 5c |e(refNum|,&cnt,"\|
|00001110| 30 33 33 4f 43 22 29 3b | 20 72 65 74 75 72 6e 3b |033OC");| return;|
|00001120| 20 2f 2a 20 6c 65 66 74 | 20 61 72 72 6f 77 20 2a | /* left| arrow *|
|00001130| 2f 0d 20 20 20 20 63 61 | 73 65 20 30 78 31 65 3a |/. ca|se 0x1e:|
|00001140| 20 46 53 57 72 69 74 65 | 28 72 65 66 4e 75 6d 2c | FSWrite|(refNum,|
|00001150| 26 63 6e 74 2c 22 5c 30 | 33 33 4f 41 22 29 3b 20 |&cnt,"\0|33OA"); |
|00001160| 72 65 74 75 72 6e 3b 20 | 2f 2a 20 75 70 20 61 72 |return; |/* up ar|
|00001170| 72 6f 77 20 2a 2f 0d 09 | 63 61 73 65 20 30 78 31 |row */..|case 0x1|
|00001180| 66 3a 20 46 53 57 72 69 | 74 65 28 72 65 66 4e 75 |f: FSWri|te(refNu|
|00001190| 6d 2c 26 63 6e 74 2c 22 | 5c 30 33 33 4f 42 22 29 |m,&cnt,"|\033OB")|
|000011a0| 3b 20 72 65 74 75 72 6e | 3b 20 2f 2a 20 64 6f 77 |; return|; /* dow|
|000011b0| 6e 20 61 72 72 6f 77 20 | 2a 2f 0d 09 63 61 73 65 |n arrow |*/..case|
|000011c0| 20 30 78 31 62 3a 20 69 | 66 20 28 63 6f 64 65 20 | 0x1b: i|f (code |
|000011d0| 3d 3d 37 31 29 20 7b 20 | 2f 2a 20 63 6c 65 61 72 |==71) { |/* clear|
|000011e0| 20 6b 65 79 20 6f 6e 20 | 6b 65 79 70 61 64 20 20 | key on |keypad |
|000011f0| 50 46 31 2a 2f 0d 09 09 | 09 46 53 57 72 69 74 65 |PF1*/...|.FSWrite|
|00001200| 28 72 65 66 4e 75 6d 2c | 26 63 6e 74 2c 22 5c 30 |(refNum,|&cnt,"\0|
|00001210| 33 33 4f 50 22 29 3b 72 | 65 74 75 72 6e 3b 0d 09 |33OP");r|eturn;..|
|00001220| 09 20 20 20 7d 20 65 6c | 73 65 20 62 72 65 61 6b |. } el|se break|
|00001230| 3b 0d 09 63 61 73 65 20 | 30 78 33 64 3a 20 69 66 |;..case |0x3d: if|
|00001240| 28 63 6f 64 65 20 3d 3d | 20 37 32 29 20 7b 20 2f |(code ==| 72) { /|
|00001250| 2a 20 22 3d 22 20 6b 65 | 79 20 6f 6e 20 6b 65 79 |* "=" ke|y on key|
|00001260| 70 61 64 20 50 46 32 20 | 2a 2f 0d 09 09 09 46 53 |pad PF2 |*/....FS|
|00001270| 57 72 69 74 65 28 72 65 | 66 4e 75 6d 2c 26 63 6e |Write(re|fNum,&cn|
|00001280| 74 2c 22 5c 30 33 33 4f | 51 22 29 3b 20 72 65 74 |t,"\033O|Q"); ret|
|00001290| 75 72 6e 3b 0d 09 09 20 | 20 20 7d 20 65 6c 73 65 |urn;... | } else|
|000012a0| 20 62 72 65 61 6b 3b 0d | 09 63 61 73 65 20 30 78 | break;.|.case 0x|
|000012b0| 32 66 3a 20 69 66 20 28 | 63 6f 64 65 20 3d 3d 20 |2f: if (|code == |
|000012c0| 37 37 29 20 7b 20 2f 2a | 20 22 2f 22 20 6b 65 79 |77) { /*| "/" key|
|000012d0| 20 6f 6e 20 6b 65 79 70 | 61 64 20 50 46 33 20 2a | on keyp|ad PF3 *|
|000012e0| 2f 0d 09 09 09 46 53 57 | 72 69 74 65 28 72 65 66 |/....FSW|rite(ref|
|000012f0| 4e 75 6d 2c 26 63 6e 74 | 2c 22 5c 30 33 33 4f 52 |Num,&cnt|,"\033OR|
|00001300| 22 29 3b 20 72 65 74 75 | 72 6e 3b 0d 09 09 20 20 |"); retu|rn;... |
|00001310| 20 7d 20 65 6c 73 65 20 | 62 72 65 61 6b 3b 0d 20 | } else |break;. |
|00001320| 20 20 20 63 61 73 65 20 | 30 78 32 61 3a 20 69 66 | case |0x2a: if|
|00001330| 20 28 63 6f 64 65 20 3d | 3d 20 36 36 29 20 7b 20 | (code =|= 66) { |
|00001340| 2f 2a 20 22 2a 22 20 6b | 65 79 20 6f 6e 20 6b 65 |/* "*" k|ey on ke|
|00001350| 79 70 61 64 20 50 46 34 | 20 2a 2f 0d 09 09 09 46 |ypad PF4| */....F|
|00001360| 53 57 72 69 74 65 28 72 | 65 66 4e 75 6d 2c 26 63 |SWrite(r|efNum,&c|
|00001370| 6e 74 2c 22 5c 30 33 33 | 4f 53 22 29 3b 20 72 65 |nt,"\033|OS"); re|
|00001380| 74 75 72 6e 3b 0d 09 09 | 20 20 20 7d 20 65 6c 73 |turn;...| } els|
|00001390| 65 20 62 72 65 61 6b 3b | 0d 09 7d 20 2f 2a 20 66 |e break;|..} /* f|
|000013a0| 69 6e 69 73 68 65 64 20 | 77 69 74 68 20 61 72 72 |inished |with arr|
|000013b0| 6f 77 20 61 6e 64 20 70 | 66 20 6b 65 79 73 20 2a |ow and p|f keys *|
|000013c0| 2f 0d 09 0d 09 2f 2a 20 | 6e 6f 77 20 6d 61 70 20 |/..../* |now map |
|000013d0| 74 68 65 20 6f 74 68 65 | 72 20 6b 65 79 73 20 6f |the othe|r keys o|
|000013e0| 6e 20 74 68 65 20 6b 65 | 79 70 61 64 20 69 66 20 |n the ke|ypad if |
|000013f0| 74 68 65 20 6b 65 79 70 | 61 64 5f 61 70 70 20 66 |the keyp|ad_app f|
|00001400| 6c 61 67 20 69 73 20 75 | 70 20 2a 2f 0d 09 69 66 |lag is u|p */..if|
|00001410| 20 28 6b 65 79 70 61 64 | 5f 61 70 70 29 0d 09 20 | (keypad|_app).. |
|00001420| 20 73 77 69 74 63 68 28 | 63 68 29 7b 0d 09 20 20 | switch(|ch){.. |
|00001430| 63 61 73 65 20 30 78 33 | 37 3a 20 69 66 28 63 6f |case 0x3|7: if(co|
|00001440| 64 65 20 3d 3d 20 38 39 | 29 20 7b 46 53 57 72 69 |de == 89|) {FSWri|
|00001450| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001460| 5c 30 33 33 4f 77 22 29 | 3b 72 65 74 75 72 6e 3b |\033Ow")|;return;|
|00001470| 7d 20 2f 2a 20 37 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 7 *|/.. ...|
|00001480| 20 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 | else br|eak;.. |
|00001490| 63 61 73 65 20 30 78 33 | 38 3a 20 69 66 28 63 6f |case 0x3|8: if(co|
|000014a0| 64 65 20 3d 3d 20 39 31 | 29 20 7b 46 53 57 72 69 |de == 91|) {FSWri|
|000014b0| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|000014c0| 5c 30 33 33 4f 78 22 29 | 3b 72 65 74 75 72 6e 3b |\033Ox")|;return;|
|000014d0| 7d 20 2f 2a 20 38 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 8 *|/.. ...|
|000014e0| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|000014f0| 63 61 73 65 20 30 78 33 | 39 3a 20 69 66 28 63 6f |case 0x3|9: if(co|
|00001500| 64 65 20 3d 3d 20 39 32 | 29 20 7b 46 53 57 72 69 |de == 92|) {FSWri|
|00001510| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001520| 5c 30 33 33 4f 79 22 29 | 3b 72 65 74 75 72 6e 3b |\033Oy")|;return;|
|00001530| 7d 20 2f 2a 20 39 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 9 *|/.. ...|
|00001540| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|00001550| 63 61 73 65 20 30 78 32 | 64 3a 20 69 66 28 63 6f |case 0x2|d: if(co|
|00001560| 64 65 20 3d 3d 20 37 38 | 29 20 7b 46 53 57 72 69 |de == 78|) {FSWri|
|00001570| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001580| 5c 30 33 33 4f 6d 22 29 | 3b 72 65 74 75 72 6e 3b |\033Om")|;return;|
|00001590| 7d 20 2f 2a 20 2d 20 2a | 2f 0d 09 20 20 09 09 09 |} /* - *|/.. ...|
|000015a0| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|000015b0| 63 61 73 65 20 30 78 33 | 34 3a 20 69 66 28 63 6f |case 0x3|4: if(co|
|000015c0| 64 65 20 3d 3d 20 38 36 | 29 20 7b 46 53 57 72 69 |de == 86|) {FSWri|
|000015d0| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|000015e0| 5c 30 33 33 4f 74 22 29 | 3b 72 65 74 75 72 6e 3b |\033Ot")|;return;|
|000015f0| 7d 20 2f 2a 20 34 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 4 *|/.. ...|
|00001600| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|00001610| 63 61 73 65 20 30 78 33 | 35 3a 20 69 66 28 63 6f |case 0x3|5: if(co|
|00001620| 64 65 20 3d 3d 20 38 37 | 29 20 7b 46 53 57 72 69 |de == 87|) {FSWri|
|00001630| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001640| 5c 30 33 33 4f 75 22 29 | 3b 72 65 74 75 72 6e 3b |\033Ou")|;return;|
|00001650| 7d 20 2f 2a 20 35 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 5 *|/.. ...|
|00001660| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|00001670| 63 61 73 65 20 30 78 33 | 36 3a 20 69 66 28 63 6f |case 0x3|6: if(co|
|00001680| 64 65 20 3d 3d 20 38 38 | 29 20 7b 46 53 57 72 69 |de == 88|) {FSWri|
|00001690| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|000016a0| 5c 30 33 33 4f 76 22 29 | 3b 72 65 74 75 72 6e 3b |\033Ov")|;return;|
|000016b0| 7d 20 2f 2a 20 36 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 6 *|/.. ...|
|000016c0| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|000016d0| 63 61 73 65 20 30 78 32 | 62 3a 20 69 66 28 63 6f |case 0x2|b: if(co|
|000016e0| 64 65 20 3d 3d 20 37 30 | 29 20 7b 46 53 57 72 69 |de == 70|) {FSWri|
|000016f0| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001700| 5c 30 33 33 4f 6c 22 29 | 3b 72 65 74 75 72 6e 3b |\033Ol")|;return;|
|00001710| 7d 20 2f 2a 20 2b 20 2a | 2f 0d 09 20 20 09 09 09 |} /* + *|/.. ...|
|00001720| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|00001730| 63 61 73 65 20 30 78 33 | 31 3a 20 69 66 28 63 6f |case 0x3|1: if(co|
|00001740| 64 65 20 3d 3d 20 38 33 | 29 20 7b 46 53 57 72 69 |de == 83|) {FSWri|
|00001750| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001760| 5c 30 33 33 4f 71 22 29 | 3b 72 65 74 75 72 6e 3b |\033Oq")|;return;|
|00001770| 7d 20 2f 2a 20 31 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 1 *|/.. ...|
|00001780| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|00001790| 63 61 73 65 20 30 78 33 | 32 3a 20 69 66 28 63 6f |case 0x3|2: if(co|
|000017a0| 64 65 20 3d 3d 20 38 34 | 29 20 7b 46 53 57 72 69 |de == 84|) {FSWri|
|000017b0| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|000017c0| 5c 30 33 33 4f 72 22 29 | 3b 72 65 74 75 72 6e 3b |\033Or")|;return;|
|000017d0| 7d 20 2f 2a 20 32 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 2 *|/.. ...|
|000017e0| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|000017f0| 63 61 73 65 20 30 78 33 | 33 3a 20 69 66 28 63 6f |case 0x3|3: if(co|
|00001800| 64 65 20 3d 3d 20 38 35 | 29 20 7b 46 53 57 72 69 |de == 85|) {FSWri|
|00001810| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001820| 5c 30 33 33 4f 73 22 29 | 3b 72 65 74 75 72 6e 3b |\033Os")|;return;|
|00001830| 7d 20 2f 2a 20 33 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 3 *|/.. ...|
|00001840| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|00001850| 63 61 73 65 20 30 78 33 | 30 3a 20 69 66 28 63 6f |case 0x3|0: if(co|
|00001860| 64 65 20 3d 3d 20 38 32 | 29 20 7b 46 53 57 72 69 |de == 82|) {FSWri|
|00001870| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001880| 5c 30 33 33 4f 70 22 29 | 3b 72 65 74 75 72 6e 3b |\033Op")|;return;|
|00001890| 7d 20 2f 2a 20 30 20 2a | 2f 0d 09 20 20 09 09 09 |} /* 0 *|/.. ...|
|000018a0| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|000018b0| 63 61 73 65 20 30 78 32 | 65 3a 20 69 66 28 63 6f |case 0x2|e: if(co|
|000018c0| 64 65 20 3d 3d 20 36 35 | 29 20 7b 46 53 57 72 69 |de == 65|) {FSWri|
|000018d0| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|000018e0| 5c 30 33 33 4f 6e 22 29 | 3b 72 65 74 75 72 6e 3b |\033On")|;return;|
|000018f0| 7d 20 2f 2a 20 2e 20 2a | 2f 0d 09 20 20 09 09 09 |} /* . *|/.. ...|
|00001900| 09 65 6c 73 65 20 62 72 | 65 61 6b 3b 0d 09 20 20 |.else br|eak;.. |
|00001910| 63 61 73 65 20 30 78 30 | 33 3a 20 69 66 28 63 6f |case 0x0|3: if(co|
|00001920| 64 65 20 3d 3d 20 37 36 | 29 20 7b 46 53 57 72 69 |de == 76|) {FSWri|
|00001930| 74 65 28 72 65 66 4e 75 | 6d 2c 26 63 6e 74 2c 22 |te(refNu|m,&cnt,"|
|00001940| 5c 30 33 33 4f 4d 22 29 | 3b 72 65 74 75 72 6e 3b |\033OM")|;return;|
|00001950| 7d 20 2f 2a 20 65 6e 74 | 20 2a 2f 0d 09 20 20 09 |} /* ent| */.. .|
|00001960| 09 09 09 65 6c 73 65 20 | 62 72 65 61 6b 3b 0d 09 |...else |break;..|
|00001970| 20 7d 20 2f 2a 20 65 6e | 64 20 6f 66 20 6b 65 79 | } /* en|d of key|
|00001980| 70 61 64 20 70 72 6f 63 | 65 73 73 69 6e 67 20 2a |pad proc|essing *|
|00001990| 2f 20 0d 09 0d 20 20 20 | 2f 2a 20 72 75 6e 20 6f |/ ... |/* run o|
|000019a0| 66 20 74 68 65 20 6d 69 | 6c 6c 20 63 68 61 72 61 |f the mi|ll chara|
|000019b0| 63 74 65 72 20 2a 2f 0d | 20 20 20 63 6e 74 20 3d |cter */.| cnt =|
|000019c0| 20 31 3b 0d 20 20 20 46 | 53 57 72 69 74 65 28 72 | 1;. F|SWrite(r|
|000019d0| 65 66 4e 75 6d 2c 26 63 | 6e 74 2c 26 63 68 29 3b |efNum,&c|nt,&ch);|
|000019e0| 0d 0d 20 20 0d 7d 0d 0d | 76 6f 69 64 20 53 68 6f |.. .}..|void Sho|
|000019f0| 77 52 65 61 64 53 74 61 | 74 73 28 29 20 2f 2a 20 |wReadSta|ts() /* |
|00001a00| 64 69 73 70 6c 61 79 20 | 69 6e 66 6f 20 6f 6e 20 |display |info on |
|00001a10| 73 65 72 69 61 6c 20 70 | 6f 72 74 20 2a 2f 0d 20 |serial p|ort */. |
|00001a20| 20 7b 20 20 63 68 61 72 | 20 74 65 6d 70 31 5b 31 | { char| temp1[1|
|00001a30| 30 5d 2c 74 65 6d 70 32 | 5b 31 30 5d 3b 20 2f 2a |0],temp2|[10]; /*|
|00001a40| 20 62 75 66 66 65 72 73 | 20 66 6f 72 20 6e 75 6d | buffers| for num|
|00001a50| 65 72 69 63 20 63 6f 6e | 76 65 72 73 69 6f 6e 20 |eric con|version |
|00001a60| 2a 2f 0d 20 20 20 20 20 | 4e 75 6d 54 6f 53 74 72 |*/. |NumToStr|
|00001a70| 69 6e 67 28 6d 61 78 52 | 65 61 64 2c 74 65 6d 70 |ing(maxR|ead,temp|
|00001a80| 31 29 3b 0d 09 20 4e 75 | 6d 54 6f 53 74 72 69 6e |1);.. Nu|mToStrin|
|00001a90| 67 28 61 76 67 52 65 61 | 64 2c 74 65 6d 70 32 29 |g(avgRea|d,temp2)|
|00001aa0| 3b 0d 09 20 50 61 72 61 | 6d 54 65 78 74 28 74 65 |;.. Para|mText(te|
|00001ab0| 6d 70 31 2c 74 65 6d 70 | 32 2c 6e 69 6c 2c 6e 69 |mp1,temp|2,nil,ni|
|00001ac0| 6c 29 3b 0d 09 20 41 6c | 65 72 74 28 53 74 61 74 |l);.. Al|ert(Stat|
|00001ad0| 73 5f 49 44 2c 6e 69 6c | 29 3b 0d 09 20 2f 2a 20 |s_ID,nil|);.. /* |
|00001ae0| 72 65 73 65 74 20 63 6f | 75 6e 74 65 72 73 20 74 |reset co|unters t|
|00001af0| 6f 20 7a 65 72 6f 20 2a | 2f 0d 09 20 6d 61 78 52 |o zero *|/.. maxR|
|00001b00| 65 61 64 20 3d 20 30 3b | 20 74 6f 74 52 65 61 64 |ead = 0;| totRead|
|00001b10| 20 3d 20 30 3b 20 63 6e | 74 52 65 61 64 20 3d 20 | = 0; cn|tRead = |
|00001b20| 30 3b 0d 20 20 20 7d 00 | 00 00 00 00 00 00 00 00 |0;. }.|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00001b90| 38 20 26 2e 00 0c 24 2e | 00 10 4a ae 00 08 6c 08 |8 &...$.|..J...l.|
|00001ba0| 42 a7 48 78 00 16 60 46 | 48 6e 00 08 4e ba 00 e4 |B.Hx..`F|Hn..N...|
|00001bb0| 1a 31 2e 20 44 44 45 78 | 70 61 6e 64 45 78 70 61 |.1. DDEx|pandExpa|
|00001bc0| 6e 64 54 65 6d 70 46 69 | 6c 65 20 78 02 00 00 00 |ndTempFi|le x....|
|00001bd0| 00 00 44 44 54 4d 44 44 | 41 50 01 00 00 00 00 00 |..DDTMDD|AP......|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 a5 f4 97 8a 00 00 | 1a a7 00 00 01 7e 04 1c |........|.....~..|
|00001c00| ff f0 4e 5e 4e 75 d2 45 | 41 44 20 20 20 20 4e 56 |..N^Nu.E|AD NV|
|00001c10| 00 00 48 e7 38 20 26 2e | 00 0c 24 2e 00 10 4a ae |..H.8 &.|..$...J.|
|00001c20| 00 08 6c 08 42 a7 48 78 | 00 16 60 46 48 6e 00 08 |..l.B.Hx|..`FHn..|
|00001c30| 4e ba 00 60 24 40 28 0a | 66 04 70 ff 60 42 08 2a |N..`$@(.|f.p.`B.*|
|00001c40| 00 01 00 01 66 08 42 a7 | 48 78 00 09 60 24 25 42 |....f.B.|Hx..`$%B|
|00001c50| 00 0c 25 43 00 10 2f 0a | 20 6a 00 04 20 68 00 10 |..%C../.| j.. h..|
|00001c60| 4e 90 22 00 4a 81 67 12 | 30 2a 00 02 48 c0 2f 00 |N.".J.g.|0*..H./.|
|00001c70| 2f 01 4e ba 03 38 70 ff | 60 06 20 02 90 aa 00 0c |/.N..8p.|`. .....|
|00001c80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 20 6c 6f |...H..Mo|naco. lo|
|00001c90| 6f 70 20 2a 2f 0d 0d 76 | 6f 69 64 20 50 72 6f 63 |op */..v|oid Proc|
|00001ca0| 65 73 73 43 68 61 00 06 | 00 04 00 29 00 03 01 53 |essCha..|...)...S|
|00001cb0| 01 fd 00 3d 00 24 01 54 | 01 fd 9d 81 72 43 00 00 |...=.$.T|....rC..|
|00001cc0| 0d bf 00 00 0d d6 00 00 | 0d 55 01 00 00 00 01 00 |........|.U......|
|00001cd0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 01 64 98 |...L...L|...2..d.|
|00001ce0| 02 94 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00001cf0| 00 0a 03 ed ff ff 00 00 | 00 00 00 02 66 3a 00 00 |........|....f:..|
+--------+-------------------------+-------------------------+--------+--------+